package ihm;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JSpinner;
import javax.swing.AbstractListModel;
import javax.swing.JComboBox;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JTextField;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.JButton;

public class FenetreAjouterCollaborateur {

	private JFrame frmAjouterUnCollaborateur;
	private JTextField txtNomAjout;
	private JTextField txtPrenomAjout;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					FenetreAjouterCollaborateur window = new FenetreAjouterCollaborateur();
					window.frmAjouterUnCollaborateur.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public FenetreAjouterCollaborateur() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frmAjouterUnCollaborateur = new JFrame();
		frmAjouterUnCollaborateur.setTitle("Ajouter un collaborateur");
		frmAjouterUnCollaborateur.setBounds(100, 100, 287, 187);
		frmAjouterUnCollaborateur.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		
		JLabel lblNom = new JLabel("Nom :");
		
		txtNomAjout = new JTextField();
		txtNomAjout.setColumns(10);
		
		JLabel lblPrnom = new JLabel("Prénom :");
		
		txtPrenomAjout = new JTextField();
		txtPrenomAjout.setColumns(10);
		
		JButton btnValiderAjout = new JButton("Valider");
		
		JButton btnAnnuler = new JButton("Annuler");
		GroupLayout groupLayout = new GroupLayout(frmAjouterUnCollaborateur.getContentPane());
		groupLayout.setHorizontalGroup(
			groupLayout.createParallelGroup(Alignment.TRAILING)
				.addGroup(Alignment.LEADING, groupLayout.createSequentialGroup()
					.addGap(42)
					.addGroup(groupLayout.createParallelGroup(Alignment.TRAILING)
						.addGroup(groupLayout.createSequentialGroup()
							.addComponent(btnValiderAjout, GroupLayout.PREFERRED_SIZE, 90, GroupLayout.PREFERRED_SIZE)
							.addGap(29)
							.addComponent(btnAnnuler, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
						.addGroup(groupLayout.createSequentialGroup()
							.addGap(16)
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
								.addComponent(lblPrnom)
								.addComponent(lblNom))
							.addGap(17)
							.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
								.addGroup(groupLayout.createSequentialGroup()
									.addGap(1)
									.addComponent(txtPrenomAjout, GroupLayout.DEFAULT_SIZE, 94, Short.MAX_VALUE)
									.addPreferredGap(ComponentPlacement.RELATED))
								.addComponent(txtNomAjout, GroupLayout.DEFAULT_SIZE, 95, Short.MAX_VALUE))
							.addGap(17)))
					.addGap(43))
		);
		groupLayout.setVerticalGroup(
			groupLayout.createParallelGroup(Alignment.LEADING)
				.addGroup(groupLayout.createSequentialGroup()
					.addGap(23)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblNom)
						.addComponent(txtNomAjout, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(26)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(lblPrnom)
						.addComponent(txtPrenomAjout, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(29)
					.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
						.addComponent(btnValiderAjout)
						.addComponent(btnAnnuler))
					.addContainerGap(121, Short.MAX_VALUE))
		);
		frmAjouterUnCollaborateur.getContentPane().setLayout(groupLayout);
	}
}
